package com.czkt.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.czkt.entity.SysRight;
import com.czkt.entity.SysRole;
import com.czkt.entity.SysRoleRight;
import com.czkt.mapper.SysRoleRightMapper;
import com.czkt.service.ISysRoleRightService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2024-06-18
 */
@Service
public class SysRoleRightServiceImpl extends ServiceImpl<SysRoleRightMapper, SysRoleRight> implements ISysRoleRightService {
    @Resource
    SysRoleRightMapper sysRoleRightMapper;

    @Override
    public List<SysRight> roleRight(Long roleId) {
        return sysRoleRightMapper.roleRight(roleId);
    }

    @Override
    public void insertRfRoleId(Long roleId,String rightCodes) {
        sysRoleRightMapper.insertRfRoleId(roleId,rightCodes);
    }

    @Override
    public void updateRoleId(SysRole sysRole) {
        sysRoleRightMapper.updateRoleId(sysRole);
    }

    @Override
    public void deleteByRfId(Long roleId) {
        sysRoleRightMapper.delByRfId(roleId);
    }

    @Override
    public SysRoleRight selectByRfRoleId(Long roleId) {
        return sysRoleRightMapper.selectByRfRoleId(roleId);
    }

    @Override
    public void delByRfId(Long roleId) {
        sysRoleRightMapper.delByRfId(roleId);
    }

    @Override
    public void deleteByRfRoleId(Long roleId) {
        sysRoleRightMapper.deleteByRfRoleId(roleId);
    }
}
